﻿import QtQuick 2.0

Item {

    id: root

    property string image_source: "qrc:/picture/empty.png"
    property string title: "这是一个空页面"

    property bool jumpButton: false
    property string jumpButton_text: "跳转"

    height: parent.height
    width: parent.width

    signal clicked()

    CustomImage{
        id: image
        height: 180*dp
        width: 180*dp
        anchors.centerIn: parent
        anchors.verticalCenterOffset: -60*dp
        source: image_source
    }
    Text{
        id: text
        anchors.centerIn: parent
        anchors.verticalCenterOffset: image.height/2 - 35*dp
        text: title
        font.pixelSize: config.fontsize
        color: "#A4A4A4"
    }
    CustomButton{
        height: 35*dp; width: 105*dp
        anchors.centerIn: parent
        anchors.verticalCenterOffset: image.height/2 + 10*dp
        visible: jumpButton
        title: jumpButton_text
        defaultMode1: true
        onClicked: {
            root.clicked()
        }
    }

}
